0 QTRS
↳1 DependencyPairsProof (⇔)
↳2 QDP
↳3 DependencyGraphProof (⇔)
↳4 QDP
↳5 QDPOrderProof (⇔)
↳6 QDP
↳7 DependencyGraphProof (⇔)
↳8 AND
↳9 QDP
↳10 Narrowing (⇔)
↳11 QDP
↳12 Narrowing (⇔)
↳13 QDP
↳14 DependencyGraphProof (⇔)
↳15 QDP
↳16 Narrowing (⇔)
↳17 QDP
↳18 DependencyGraphProof (⇔)
↳19 QDP
↳20 QDPOrderProof (⇔)
↳21 QDP
↳22 QDPOrderProof (⇔)
↳23 QDP
↳24 NonTerminationProof (⇔)
↳25 NO
↳26 QDP
↳27 UsableRulesProof (⇔)
↳28 QDP
↳29 QDPSizeChangeProof (⇔)
↳30 YES
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
PRIMES → SIEVE(from(s(s(0))))
PRIMES → FROM(s(s(0)))
FROM(X) → CONS(X, n__from(s(X)))
TAIL(cons(X, Y)) → ACTIVATE(Y)
IF(true, X, Y) → ACTIVATE(X)
IF(false, X, Y) → ACTIVATE(Y)
FILTER(s(s(X)), cons(Y, Z)) → IF(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
FILTER(s(s(X)), cons(Y, Z)) → SIEVE(Y)
SIEVE(cons(X, Y)) → CONS(X, n__filter(X, sieve(activate(Y))))
SIEVE(cons(X, Y)) → SIEVE(activate(Y))
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__filter(X1, X2)) → FILTER(X1, X2)
ACTIVATE(n__cons(X1, X2)) → CONS(X1, X2)
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
ACTIVATE(n__filter(X1, X2)) → FILTER(X1, X2)
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
FILTER(s(s(X)), cons(Y, Z)) → SIEVE(Y)
SIEVE(cons(X, Y)) → SIEVE(activate(Y))
SIEVE(cons(X, Y)) → ACTIVATE(Y)
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
SIEVE(cons(X, Y)) → ACTIVATE(Y)
POL( SIEVE(x1) ) = x1 + 2
POL( activate(x1) ) = x1 + 2
POL( n__from(x1) ) = 2x1
POL( from(x1) ) = 2x1 + 2
POL( n__filter(x1, x2) ) = max{0, x2 - 2}
POL( filter(x1, x2) ) = x2
POL( n__cons(x1, x2) ) = 2x1 + 2x2 + 2
POL( cons(x1, x2) ) = 2x1 + 2x2 + 2
POL( s(x1) ) = max{0, -2}
POL( if(x1, ..., x3) ) = 2x1 + 2x2
POL( divides(x1, x2) ) = 2x1 + x2 + 1
POL( sieve(x1) ) = max{0, 2x1 - 2}
POL( ACTIVATE(x1) ) = x1 + 2
POL( FILTER(x1, x2) ) = x2
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
filter(X1, X2) → n__filter(X1, X2)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
cons(X1, X2) → n__cons(X1, X2)
from(X) → cons(X, n__from(s(X)))
from(X) → n__from(X)
ACTIVATE(n__filter(X1, X2)) → FILTER(X1, X2)
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
FILTER(s(s(X)), cons(Y, Z)) → SIEVE(Y)
SIEVE(cons(X, Y)) → SIEVE(activate(Y))
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
SIEVE(cons(X, Y)) → SIEVE(activate(Y))
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
SIEVE(cons(y0, n__from(x0))) → SIEVE(from(x0))
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(filter(x0, x1))
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, x0)) → SIEVE(x0)
SIEVE(cons(y0, n__from(x0))) → SIEVE(from(x0))
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(filter(x0, x1))
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, x0)) → SIEVE(x0)
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
SIEVE(cons(y0, n__from(x0))) → SIEVE(n__from(x0))
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(filter(x0, x1))
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, x0)) → SIEVE(x0)
SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
SIEVE(cons(y0, n__from(x0))) → SIEVE(n__from(x0))
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(filter(x0, x1))
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, x0)) → SIEVE(x0)
SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
SIEVE(cons(y0, n__filter(s(s(x0)), cons(x1, x2)))) → SIEVE(if(divides(s(s(x0)), x1), n__filter(s(s(x0)), activate(x2)), n__cons(x1, n__filter(x0, sieve(x1)))))
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(n__filter(x0, x1))
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, x0)) → SIEVE(x0)
SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
SIEVE(cons(y0, n__filter(s(s(x0)), cons(x1, x2)))) → SIEVE(if(divides(s(s(x0)), x1), n__filter(s(s(x0)), activate(x2)), n__cons(x1, n__filter(x0, sieve(x1)))))
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(n__filter(x0, x1))
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, x0)) → SIEVE(x0)
SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
SIEVE(cons(y0, x0)) → SIEVE(x0)
trivial
cons_1=1
n__from=1
cons(X1, X2) → n__cons(X1, X2)
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
trivial
n__cons_1=1
n__from=1
cons_1=2
cons(X1, X2) → n__cons(X1, X2)
SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__filter(X1, X2)) → FILTER(X1, X2)
primes → sieve(from(s(s(0))))
from(X) → cons(X, n__from(s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__filter(X1, X2)) → FILTER(X1, X2)
From the DPs we obtained the following set of size-change graphs: